<?php
// +----------------------------------------------------------------------
// | ZanPianCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.zanpian.com All rights reserved.
// +----------------------------------------------------------------------
// | BBS:  <http://www.feifeicms.cc>
// +----------------------------------------------------------------------
namespace app\common\validate;
class User extends Base{
	protected $rule = array(
		'username'   => 'require|unique:user',
		'email'      => 'unique:user|email',
		'password'   => 'require',
		'repassword' => 'confirm:password',
		'verifypass' => 'confirm:password'
	);
	protected $message = array(
		'username.require'    => '用户名必填',
		'username.unique'    => '用户名存在',
		'email.unique'    => '邮箱存在',
		'password.require' => '必须输入密码',
		'repassword.require'    => '确认密码和密码必须一致',
		'verifypass.require'    => '重复密码必须和新密码一致',
	);
	protected $scene = array(
		'edit'     => 'email',
		'password' => 'password,repassword',
		'pwd' => 'password,verifypass',
		'email'     => 'email',
		'username'     => 'username',
		'reg'     => 'username,email,password',
	);

}